import http from '@/api/http'
import type { WechatUser, WechatUserListData } from '@/types/wechat.api'

// 微信用户列表
export function listWechatUsers(params?: {
  nickname?: string
  status?: string
  openid?: string
  page?: number
  size?: number
}): Promise<ApiResponse<WechatUserListData>> {
  return http.get<WechatUserListData>('/admin/wechat/users', { params })
}

// 微信用户详情
export function getWechatUserDetail(id: string): Promise<ApiResponse<WechatUser>> {
  return http.get<WechatUser>(`/admin/wechat/users/${id}`)
}